package com.kou.backend.api.log;

import com.github.pagehelper.PageInfo;
import com.kou.backend.request.log.ExportLogReqDTO;
import com.kou.backend.request.log.LogLoginQueryListReqDTO;
import com.kou.backend.resposne.ResultResponse;
import com.kou.backend.resposne.log.LogLoginListResponseDTO;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import jakarta.servlet.http.HttpServletResponse;
import javax.validation.Valid;

/**
 * 登录日志相关接口
 *
 * @author: Kou
 * @since: 2023/9/2 13:42
 */
@Tag(name = "登录日志相关接口")
@RequestMapping("v1/api/login-log")
@Validated
public interface ILogLoginClient {
    /**
     * 查询登录日志列表接口
     *
     * @param logLoginQueryListReqDTO 查询登录日志列表接口请求体
     * @return result
     */
    @PostMapping("/query-list")
    ResultResponse<PageInfo<LogLoginListResponseDTO>> queryList(@RequestBody @Valid LogLoginQueryListReqDTO logLoginQueryListReqDTO);

    /**
     * 批量导出登录日志
     *
     * @param exportLogReqDTO     导出日志请求体
     * @param httpServletResponse response
     */
    @PostMapping("/batch-export")
    void export(@RequestBody ExportLogReqDTO exportLogReqDTO, HttpServletResponse httpServletResponse);
}
